Skip to content

Fix Android binding generation and local build setup#139

Merged
Guardiola31337 merged 1 commit intomainfrom
fix/android-uniffi-bindings
Jan 18, 2026
Merged

Fix Android binding generation and local build setup#139
Guardiola31337 merged 1 commit intomainfrom
fix/android-uniffi-bindings

Conversation

@Guardiola31337
Copy link
Copy Markdown
Contributor

@Guardiola31337 Guardiola31337 commented Jan 18, 2026

Description

  • Fixes Android binding generation and local build setup

Changes

  • Create build_android_local.sh script to build, generate UniFFI bindings (re-using kotlin/build.sh), and publish SNAPSHOTs
  • Update README with local development prerequisites (NDK, protoc) and instructions
  • Preserve UniFFI metadata in release builds so Kotlin bindings are generated and packaged in the Android AAR cc @paolodamico @lukejmann
  • Add a Rust toolchain file and local build env handling to make Android builds reproducible cc @paolodamico @lukejmann
  • Ensure native libs are built with 16KB page alignment to address Android 15 warnings cc @MarinJuricev @paolodamico (refs. Android 16kb Page Alignment #129)
  • Make the Kotlin project open cleanly in Android Studio by adding a root build.gradle.kts cc @MarinJuricev
  • Bump Android compileSdk to 35 in the lib module cc @MarinJuricev
  • Add Kotlin .gitignore rules so generated bindings, jni libs, and IDE/Gradle artifacts don't get committed
  • iOS folks (@sideround @thomas-waite @forceunwrap @thomasbarbalet): please take a quick look to confirm no regressions on your side, I'm not fluent with Rust expert would appreciate a thorough review 🙏

Testing

  • $> RUSTUP_HOME=~/.rustup CARGO_HOME=~/.cargo ./build_android_local.sh 0.3.1-SNAPSHOT
  • Integrated org.world:walletkit-android:0.3.1-SNAPSHOT into wld-android and confirmed UniFFI bindings are present and 16KB page warnings are gone

Comment thread Cargo.toml
authors = ["World Contributors"]
readme = "./README.md"
homepage = "https://docs.world.org" # TODO: Update to specific WalletKit page
rust-version = "1.86" # MSRV
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped the rust-version as I was running into Format, Clippy & Build and Tests issues https://github.com/worldcoin/walletkit/actions/runs/21117220277

Comment thread Cargo.toml
[profile.release]
opt-level = 'z' # Optimize for size.
lto = true # Enable Link Time Optimization.
strip = true # Automatically strip symbols from the binary.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the culprit of preventing bindings to get exposed and available from walletkit-android.

@Guardiola31337 Guardiola31337 force-pushed the fix/android-uniffi-bindings branch from f90e705 to 5c332f2 Compare January 18, 2026 19:55
Comment thread README.md
dependencies {
/// ...
implementation "org.world:walletkit:VERSION"
implementation "org.world:walletkit-android:VERSION"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
implementation "org.world:walletkit-android:VERSION"
implementation "org.world:walletkit:VERSION"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paolodamico

artifactId = "walletkit-android"
do we want to change it to walletkit?

@Guardiola31337
Copy link
Copy Markdown
Contributor Author

Going ahead and merging here, we can follow up on the walletkit vs walletkit-android artifact name later. Thanks @paolodamico for the review 🙇‍♂️

@Guardiola31337 Guardiola31337 merged commit 4169f5e into main Jan 18, 2026
13 checks passed
@Guardiola31337 Guardiola31337 deleted the fix/android-uniffi-bindings branch January 18, 2026 21:52
@github-actions github-actions bot mentioned this pull request Jan 18, 2026
@github-actions github-actions bot mentioned this pull request Jan 19, 2026
@Guardiola31337
Copy link
Copy Markdown
Contributor Author

we can follow up on the walletkit vs walletkit-android artifact name later.

Create a ticket https://linear.app/worldcoin/issue/MCORE-603/change-walletkit-artifact-name-and-publish-to-maven-repository

2 similar comments
@Guardiola31337
Copy link
Copy Markdown
Contributor Author

we can follow up on the walletkit vs walletkit-android artifact name later.

Create a ticket https://linear.app/worldcoin/issue/MCORE-603/change-walletkit-artifact-name-and-publish-to-maven-repository

@Guardiola31337
Copy link
Copy Markdown
Contributor Author

we can follow up on the walletkit vs walletkit-android artifact name later.

Create a ticket https://linear.app/worldcoin/issue/MCORE-603/change-walletkit-artifact-name-and-publish-to-maven-repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants